package org.abacus.platform.action.ask;

import java.io.IOException;
import java.net.URLConnection;
import java.security.Permission;

public class Request {
	Ask ask;
	URLConnection conn;

	public Request(Ask ask) {
		super();
		this.ask = ask;
		try {
			conn = this.ask.openConnection();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void addRequestProperty(String key, String value) {
		conn.addRequestProperty(key, value);
	}

	public void setRequestProperty(String key, String value) {
		conn.setRequestProperty(key, value);
	}

	public void connect() throws IOException {
		conn.connect();
	}

	public Permission getPermission() throws IOException {
		return conn.getPermission();
	}
}
